<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/rp/common/taglib.jsp" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <base href="<%=basePath%>">
    
    <title>编辑底栏</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
	
	<script src="rp/scripts/boot.js" type="text/javascript"></script>
	
	<style type="text/css">
	   	
    </style>
	
  </head>
  
  <body class="body-p5">
  	
  	<span>底栏背景色：</span>
  	<input id="footerBackgroundColor" class="mini-textbox" style="width: 100%;"/>
  	<textarea id="textarea1" class="mini-textarea" emptyText="请输入底栏显示文本" 
  		style="width: 100%;height: 250px;margin-bottom: 5px; margin-top: 5px;"></textarea>
  	
  	<a class="mini-button" onclick="save()"><i class="fa fa-floppy-o fa-lg"></i> 保存</a>
  	
	<script type="text/javascript">
		$(function(){
			mini.parse();
			
			rp_ajax("rp/system/baseData/preMng/getPreValue", {preName:"footerText"}, function(result){
				var $textarea1 = mini.get("textarea1");
				$textarea1.setValue(result);
			});

			rp_ajax("rp/system/baseData/preMng/getPreValue", {preName:"footerBackgroundColor"}, function(result){
				var $topNorthHeight = mini.get("footerBackgroundColor");
				$topNorthHeight.setValue(result);
			});
		});

		function save(){
			rp_ajax("rp/system/baseData/preMng/setPreValue", {preName:"footerText", preValue:mini.get("textarea1").getValue()}, function(result){
				if(result != "success"){
					mini.alert("保存失败");
					return false;
				}
			},false);
			rp_ajax("rp/system/baseData/preMng/setPreValue", {preName:"footerBackgroundColor", preValue:mini.get("footerBackgroundColor").getValue()}, function(result){
				if(result != "success"){
					mini.alert("保存失败");
					return false;
				}
			},false);
			mini.alert("保存成功");
		}
	</script>
  </body>
</html>
